<div class="navshadw visible-lg"></div>
<div class="mdshadow visible-md"></div>
<div class="smshadow visible-sm"></div>
<div class="xsshadow visible-xs"></div>
<div class="jgnuwsnavbox hidden-xs">
<div class="mainbody">
	<div class="col-md-12">
		<?php 
			$notif = $this->session->flashdata('notif');
			$status = $this->session->flashdata('notif_status');
			?>
			<?php if($status != ""): ?>
				<?php if($status == "0"): ?>
					<div class="notif notif-gagal"><?php echo $notif ?></div>
				<?php endif; ?>
				<?php if($status == "1"): ?>
					<div class="notif notif-sukses"><?php echo $notif ?></div>
				<?php endif; ?>
			<?php endif; ?>
	</div>
	<div class="col-md-8">
		<h1 class="categorypagettl">Postian dengan Kategori "Kategori"</h1>
		<?php foreach($post as $post_rec): ?>
			<h2 class="home-post-title"><a href="<?php echo site_url("home/post/$post_rec[jonu_post_permalink]") ?>"><?php echo $post_rec['jonu_post_title'] ?></a></h2>
			<img class="home-post-img" src="<?php echo base_url("asset/img/posts-image/$post_rec[jonu_post_image]") ?>" width="100%" height="auto"/>
			<div class="home-post-detail">
				<span>Diposkan oleh <?php echo $post_rec['jonu_user_fullname'] ?></span> 
				<span>123 Likes</span>
				<span>323 Dislikes</span>
				<span>22 Comments</span>
			</div>
			<div class="home-post-desc">
				<?php if(strlen($post_rec['jonu_post_content']) > 200): ?>
					<?php echo substr($post_rec['jonu_post_content'], 0, 300)." . . . ." ?>
					<a href="<?php echo site_url("home/post/$post_rec[jonu_post_permalink]") ?>"><small>Read More</small></a>
				<?php else: ?>
					<?php echo $post_rec['jonu_post_content']; ?>
				<?php endif; ?>

			</div>
			<div class="home-post-btn-container">
				<span class="pull-left">
					<a href="#" class="home-post-btn" title="Like"><i class="fa fa-fw fa-thumbs-up"></i></a>
					<a href="#" class="home-post-btn" title="Dislike"><i class="fa fa-fw fa-thumbs-down"></i></a>
					<a href="#" class="home-post-btn" title="Leave a comment"><i class="fa fa-fw fa-comments"></i></a>
				</span>
				<span class="pull-right">
					<a href="#" class="home-share-fb btn-share home-post-btn" title="Share to Facebook">Facebook</a>
					<a href="#" class="home-share-twitter btn-share home-post-btn" title="Share to Twitter">Twitter</a>
				</span>
			</div>				
	<?php endforeach; ?>
	</div>
	<aside class="col-md-4">
		<div style="width:100%;height:300px;margin-bottom:10px;background-color:#aaa;"></div>
		<div class="sidebar-widget">
			<h3 class="sidebar-widget-title">Recommended Posts</h3>
			<ul class="recommended">
				<?php foreach($recommend_post as $recommend_rec): ?>
					<li>
					<img src="<?php echo base_url("asset/img/posts-image/$recommend_rec[jonu_post_image]") ?>" class="recommended-img">
						<a href="<?php echo site_url("home/post/$recommend_rec[jonu_post_permalink]") ?>" class="recommended-title"><?php echo $recommend_rec['jonu_post_title'] ?></a>
					</li>
				<?php endforeach; ?>
			</ul>
		</div>
	</aside>
	<div class="sambungfloat"></div>
</div>
</div>
<!-- view sm  -->
<div class="visible-xs">
	<?php foreach($post as $post_rec): ?>
	<div class="vspostbox">
		<h2 class="vsttlpost"><a href="<?php echo site_url("home/post/$post_rec[jonu_post_permalink]") ?>"><?php echo $post_rec['jonu_post_title'] ?></a></h2>
		<div class="vsdespostbox">
			<div class="vsdespost txtmerah">by : <?php echo $post_rec['jonu_user_fullname'] ?></div>
			<div class="vsdespost">9 menit yag lalu</div>
			<div class="vsdespost"> 123 like</div>
			<div class="vsdespost">1003 viewer</div>
			<div class="sambungfloat"></div>
		</div>
		<div class="vsimgpost">
			<img src="<?php echo base_url("asset/img/posts-image/$post_rec[jonu_post_image]") ?>" width="100%" alt="ikuti judul post">
		</div>
		<div class="vsbtnbox">
			<div class="col-xs-6 paddingnone">
				<a href="#" class="btn btn-default btnjgjnu"><i class="fa fa-thumbs-o-up"></i></a>
				<a href="#" class="btn btn-default btnjgjnu"><i class="fa fa-thumbs-o-down"></i></a>
			</div>
			<div class="col-xs-6 paddingnone">
				<a href="#" class="btn btn-default btnjgjnu jgjsertw kanan"><b><i class="fa fa-twitter"></i></b></a>
				<a href="#" class="btn btn-default btnjgjnu jgjserfa kanan"><b><i class="fa fa-facebook"></i></b></a>
			</div>
			<div class="sambungfloat"></div>
		</div>
	</div>
	<?php endforeach; ?>
</div>